from fastapi import FastAPI
import uvicorn
from tortoise.contrib.fastapi import register_tortoise
from config.db_config import db_config
from  api.user import router as user_router
from api.admin import router as admin_router
app=FastAPI()
register_tortoise(
    app=app,
    config=db_config
)
app.include_router(user_router,tags=["用户操作"],prefix="/users")
app.include_router(admin_router,tags=['管理员操作'],prefix="/admin")
if __name__ == '__main__':
    uvicorn.run(app,host="127.0.0.1",port=8000)